#ifndef _H_TYPE
#define _H_TYPE
#define PERFORM_ARRAY_SIZE 300
typedef struct _t_cpuinfo{
        float user;
        float nice;
        float sys;
        float idle;
        float iowait;
//        初值处理C++构造方式
        _t_cpuinfo():user(0),nice(0),sys(0),idle(0),iowait(0){}
}t_cpuinfo;
typedef struct _t_meminfo{
    float free;
    float cache;
    float swap;
    float share;
//    初值处理C++构造方式
    _t_meminfo():free(0),cache(0),swap(0),share(0){}
}t_meminfo;

typedef struct _t_traffic_info{
    float inbound;
    float outbound;
//    初值处理C++构造方式
    _t_traffic_info():inbound(0),outbound(0){}
}t_traffic_info;

typedef struct _t_host_perform
{
    t_cpuinfo cpu[PERFORM_ARRAY_SIZE];
    t_meminfo mem[PERFORM_ARRAY_SIZE];
    t_traffic_info traffic[PERFORM_ARRAY_SIZE];
}t_host_perform;

#endif
